package g.beny.manage.action;

import g.beny.framework.web.ActionSupport;
import g.beny.manage.bean.PermissionResource;
import g.beny.manage.services.PermissionResourceService;

import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Param;

@At("/PermissionResource")
@IocBean
public class PermissionResourceAction extends ActionSupport{
	@Inject
    private PermissionResourceService  permissionResourceService;
	
	@At
	public Object list(@Param("page") int page ,@Param("rows") int rows){
		return permissionResourceService.list(page,rows);
	}
	
	@At
	public boolean add(@Param("..") PermissionResource obj){
		return permissionResourceService.add(obj);
	}
	
	@At
	public boolean delete(@Param("..") PermissionResource obj){
		return permissionResourceService.delete(obj);
	}
	
	@At
	public boolean update(@Param("..") PermissionResource obj){
		return permissionResourceService.update(obj);
	}
}